package com.example.ui_demo_widget;

import androidx.appcompat.app.AppCompatActivity;

import android.graphics.Color;
import android.os.Bundle;
import android.widget.TextView;

import com.xl.ui_demo_widget.R;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView textView = findViewById(R.id.tv_demo);
        textView.setText("测试");
        textView.setWidth(256);
        textView.setHeight(256);
        textView.setBackgroundColor(Color.GREEN);
        textView.setTextColor(Color.BLUE);
        textView.setTextSize(20);

    }
}